In recent years, a semiconductor memory in which memory cells are laminated in stacked layers has been developed. This semiconductor memory provides high storage capacity at low cost. Increased miniaturization and higher storage densities cause various problems such as increasing sizes of related peripheral circuits in the memory device and associated wiring congestion as more memory cells are packed in smaller and smaller volumes.